Skip to content

Add labels param to git.github_pr_destination - #364

Open
lf- wants to merge 1 commit into
google:masterfrom
mercury:jade/push-nuzurztkmlpx
Open

lf- wants to merge 1 commit into
google:masterfrom
mercury:jade/push-nuzurztkmlpx

Conversation

@lf-

@lf- lf- commented Nov 26, 2026

Copy link
Copy Markdown

Problem: I want to clearly mark automated import PRs to make them easier to find. Without this we have to wrap Copybara with another tool that does this.
Solution: add a label feature to github_pr_destination.

GitHub's create-PR endpoint does not accept labels, so they are added with a separate addLabels call after creation, and also when the PR already exists. Labels support ${LABEL} templates like assignees, and failure to apply them is a warning rather than an error.

Tested live: mercury#1

Assisted-By: Claude Sonnet 5.5

Problem: I want to clearly mark automated import PRs to make them easier
to find. Without this we have to wrap Copybara with another tool that
does this.
Solution: add a label feature to github_pr_destination.

GitHub's create-PR endpoint does not accept labels, so they are added
with a separate addLabels call after creation, and also when the PR
already exists. Labels support ${LABEL} templates like assignees, and
failure to apply them is a warning rather than an error.

Tested live: #1

Assisted-By: Claude Sonnet 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant